package com.aishua.aishuawallet.bean;

/**
 * Created by aishua on 2018/8/7.
 */

public class Header implements IRequestString{

//    报文头
    private String Total_Length;
    private String Version;
    private String Command_ID;
    private String OrderID;
    private String SenderCode;

    public String getTotal_Length() {
        return Total_Length;
    }

    public void setTotal_Length(String total_Length) {
        Total_Length = total_Length;
    }

    public String getVersion() {
        return Version;
    }

    public void setVersion(String version) {
        Version = version;
    }

    public String getCommand_ID() {
        return Command_ID;
    }

    public void setCommand_ID(String command_ID) {
        Command_ID = command_ID;
    }

    public String getOrderID() {
        return OrderID;
    }

    public void setOrderID(String orderID) {
        OrderID = orderID;
    }

    public String getSenderCode() {
        return SenderCode;
    }

    public void setSenderCode(String senderCode) {
        SenderCode = senderCode;
    }


    @Override
    public String requestString() {

        String data = getVersion()+getCommand_ID()+getOrderID()+getSenderCode();
        String hexlength =String.format("%08X",data.length() );

        return hexlength+data;
    }
}
